package com.kou.backend.api.user;

import com.kou.backend.request.login.UserLoginReqDTO;
import com.kou.backend.resposne.ResultResponse;
import com.kou.backend.resposne.login.UserLoginResponseDTO;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;

/**
 * 用户登录流程
 *
 * @author: Kou
 * @since: 2023/8/24 20:03
 */
@Tag(name = "用户登录流程相关接口")
@RequestMapping("v1/api/user")
@Validated
public interface IUserLoginClient {

    @PostMapping("/login")
    @Operation(summary = "登录")
    ResultResponse<UserLoginResponseDTO> login(@Valid @RequestBody UserLoginReqDTO userLoginReqDTO, HttpServletRequest request);

    @PostMapping("/logout")
    @Operation(summary = "登出")
    ResultResponse<Object> logout();
}
